package com.qinggeng.project.system.service;

import com.qinggeng.project.api.dto.ActivityGoodsDto;
import com.qinggeng.project.api.dto.GoodsActivityDto;
import com.qinggeng.project.system.domain.GoodsActivity;

import java.util.List;

/**
 * 商品活动接口
 *
 * @author 吴鹏飞
 * @date 2020/9/3
 */
public interface IGoodsActiviyService {
    /**
     * 查询最新商品活动
     *
     * @return
     */
    GoodsActivity selectFirstGoodsActivity();

    /**
     * 查询商品活动
     * @return
     */
    List<GoodsActivity> selectGoodsActivity(GoodsActivity goodsActivity);

    /**
     * 添加活动
     * @param goodsActivity
     * @return
     */
    int insertGoodsActivity(GoodsActivity goodsActivity);

    /**
     * 通过goodsId修改beatNum
     * @param goodsId
     * @param groupNum
     */
    void updateGoodsActivityOnGroupNumByGoodsId(Long goodsId, Integer groupNum);

    /**
     * 根据商品id查出捶一捶商品关联信息
     * @param goodsId
     */
    ActivityGoodsDto selectGooodsActivityDtoBy(Long goodsId);
}
